package com.github.appintro.internal;

import java.io.Serializable;

public class PermissionWrapper implements Serializable {
    String[] permissions;
    int position;
    boolean required;

    public PermissionWrapper(String[] permissions, int position, boolean required) {
        super();
        this.permissions = permissions;
        this.position = position;
        this.required = required;
    }

    @Override
    public int hashCode() {
        int result = permissions.hashCode();
        result = 31 * result + position;
        result = 31 * result + Boolean.valueOf(required).hashCode();
        return result;
    }

    public final String[] getPermissions() {
        return this.permissions;
    }

    public void setPermissions(String[] var1) {
        this.permissions = var1;
    }

    public final int getPosition() {
        return this.position;
    }

    public void setPosition(int var1) {
        this.position = var1;
    }

    public final boolean getRequired() {
        return this.required;
    }

    public void setRequired(boolean var1) {
        this.required = var1;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj instanceof PermissionWrapper) {
            PermissionWrapper other = (PermissionWrapper) obj;
            if (!permissions.equals(other.permissions)) {
                return false;
            }
            if (position != other.position) {
                return false;
            }
            if (required != other.required) {
                return false;
            }
            return true;
        } else {
            return false;
        }
    }
}
